<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="play">过山车</div>
    <div class="play">旋转木马</div>
    <div class="play">摩天轮</div>
    <div class="play">观音院</div>
</body>
</html>
<script>
    var firstPro=document.querySelector('.play')
    console.log(firstPro);
    var allPro=document.querySelectorAll('.play')
    console.log(allPro);
</script>